Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shebang-regex

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shebang-regex

Regular expression for matching a shebang

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35M
decreased by-47.39%
Maintainers
1
Weekly downloads
 
Created

What is shebang-regex?

The shebang-regex npm package is a simple utility that provides a regular expression for matching shebang lines in files. A shebang line is the first line in a script file that is used to indicate the script interpreter to be used to execute the file. It is commonly found at the top of script files in Unix-based systems and starts with '#!'. This package helps in identifying and extracting the shebang line from files.

What are shebang-regex's main functionalities?

Shebang line matching

The shebang-regex package exports a regular expression that matches the shebang line. Here's an example of how to use it in code to test if a string contains a shebang line: `const shebangRegex = require('shebang-regex'); console.log(shebangRegex.test('#!/usr/bin/env node')); // true`

/^#!.+/

Other packages similar to shebang-regex

Keywords

FAQs

Package last updated on 17 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc